home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / fly8111-.000 / fly8111- / fly8 / DJGPP / djgpp.c < prev    next >
C/C++ Source or Header  |  1979-12-31  |  1KB  |  83 lines

  1. /* --------------------------------- djgpp.c -------------------------------- */
  2.  
  3. /* This is part of the flight simulator 'fly8'.
  4.  * Author: Eyal Lebedinsky (eyal@ise.canberra.edu.au).
  5. */
  6.  
  7. /* general system-specific stuff for UNIX.
  8. */
  9.  
  10. #include "fly.h"
  11.  
  12.  
  13. /* ints.s */
  14. extern void IntOn (Ulong flags);
  15. extern Ulong IntOff (void);
  16.  
  17. static int FAR
  18. init (void)
  19. {return (0);}
  20.  
  21. static void FAR
  22. term (void)
  23. {}
  24.  
  25. static void FAR
  26. poll (void)
  27. {
  28.     Tm->Milli ();
  29. }
  30.  
  31. static Ulong FAR
  32. disable (void)
  33. {
  34.     return (IntOff ());
  35. }
  36.  
  37. static void FAR
  38. enable (Ulong flags)
  39. {
  40.     IntOn (flags);
  41. }
  42.  
  43. static void FAR
  44. shell (void)
  45. {
  46.     MsgWPrintf (20, "shell not implemented");
  47. }
  48.  
  49. static void FAR
  50. BuildFileName (char *FullName, char *path, char *name, char *ext)
  51.  
  52. /* Build file name from parts.
  53.  * path is NULL for "current directory".
  54.  * path is ""   for "root directory".
  55. */
  56.  
  57. {
  58.     FullName[0] = '\0';
  59.  
  60.     if (path) {
  61.         strcat (FullName, path);
  62.         strcat (FullName, "\\");
  63.     }
  64.     strcat (FullName, name);
  65.     if (ext && ext[0]) {
  66.         strcat (FullName, ".");
  67.         strcat (FullName, ext);
  68.     }
  69. }
  70.  
  71. struct SysDriver SysDriver = {
  72.     "DJGPP",
  73.     0,
  74.     NULL,    /* extra */
  75.     init,
  76.     term,
  77.     poll,
  78.     disable,
  79.     enable,
  80.     shell,
  81.     BuildFileName
  82. };
  83.